package com.alm.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author ywy
 * @date 2024/7/9
 */
@Getter
@AllArgsConstructor
public enum YesNotEnum {

    /**
     * 是
     */
    Y("Y", "是"),

    /**
     * 否
     */
    N("N", "否");

    private String code;

    private String value;

    public static String getValueByCode(String code) {
        for (YesNotEnum obj : YesNotEnum.values()) {
            if(obj.getCode().equalsIgnoreCase(code)) {
                return obj.getValue();
            }
        }
        return "";
    }
}
